import request from "@/utils/request"
export default {
    // /resources/carousel  获取轮播图数据
    getCarousel(data) {
        return request({
            url: "/api/resources/carousel",
            method: "POST",
            data: data
        })
    },
    // 首页手机列表
    // /api/product/getPromoProduct
    getPromoProduct(data = { "categoryName": "手机" }) {
        return request({
            url: "/api/product/getPromoProduct",
            method: "POST",
            data: data
        })
    },

    // 手机家电数据
    getPromoProductHome(data = { "categoryName": "空调" }) {
        return request({
            url: "/api/product/getPromoProduct",
            method: "POST",
            data: data
        })
    },
    // 手机洗衣机数据
    getPromoProductWashing(data = { "categoryName": "洗衣机" }) {
        return request({
            url: "/api/product/getPromoProduct",
            method: "POST",
            data: data
        })
    },
    // 手机洗衣机数据
    getPromoProductTV(data = { "categoryName": "电视机" }) {
        return request({
            url: "/api/product/getPromoProduct",
            method: "POST",
            data: data
        })
    },

    //配件保护套数据
    getMobilePhone(data = { "categoryName": "保护套"}){
        return request({
            url: "/api/product/getPromoProduct",
            method: "POST",
            data: data
        })
    },
    //
    // 家电热门数据
    getJiaDian(data ={categoryName: ["电视机", "空调", "洗衣机"]}){
        return request({
            url: "/api/product/getHotProduct",
            method: "POST",
            data: data
        })
    },  
    //配件保护膜数据
    getProtectiveFilm(data = { "categoryName": "保护膜"}){
        return request({
            url: "/api/product/getPromoProduct",
            method: "POST",
            data: data
        })
    },
    //配件充电器数据
    getCharger(data = { "categoryName": "充电器"}){
        return request({
            url: "/api/product/getPromoProduct",
            method: "POST",
            data: data
        })
    },
    //配件热门数据
    getPhoneFirmCharger(data={"categoryName":["保护套","保护膜", "充电器" ,"充电宝"]}){
        return request({
            url:"/api/product/getHotProduct",
            method:"POST",
            data:data
        })
    },
    // 全部商品数据
    getDetails(data={"categoryID":[],"currentPage":1,"pageSize":35}){
        return request({
            url:`/api/product/getAllProduct`,
            method:"POST",
            data:data
        })
    },
    getDetailss(data={}){
        return request({
            url:"/api/product/getDetailsPicture",
            method:"POST",
            data:data
        })
    }
}
